package com.crois.barrier.admin.mapstruct;

import com.crois.barrier.admin.dto.IpAndWeightDto;
import com.crois.barrier.admin.entity.IpAndWeight;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
* barrier 实例信息表实体互转
*
* @author Hou Ze Yu
* @version 1.0
* @date 2021-10-25 11:58:26
**/
@Mapper
public interface IpAndWeightDtoEntityMapper {

    IpAndWeightDtoEntityMapper INSTANCE = Mappers.getMapper(IpAndWeightDtoEntityMapper.class);

    /**
     * barrier 实例信息表 Dto
     * @param ipAndWeight barrier 实例信息表实体
     * @return barrier 实例信息表Dto
     */
    IpAndWeightDto toIpAndWeightDto(IpAndWeight ipAndWeight);

    /**
     * barrier 实例信息表dto转换成实体
     * @param ipAndWeightDto barrier 实例信息表Dto
     * @return barrier 实例信息表实体
     */
    IpAndWeight toIpAndWeightEntity(IpAndWeightDto ipAndWeightDto);

    /**
     * barrier 实例信息表实体集合转换成dto集合
     * @param ipAndWeightList barrier 实例信息表实体集合
     * @return barrier 实例信息表dto集合
     */
    List<IpAndWeightDto> toIpAndWeightDtoList(List<IpAndWeight> ipAndWeightList);
}
